import React from "react";
import { Routes, Route, Navigate } from "react-router-dom";
import ProductHome from "./home";
import ProductAddUpdate from "./add-update";
import ProductDetail from "./detail";

const Product = () => {
  return (
    <Routes>
      <Route path="/" element={<ProductHome />} />
      <Route path="/addupdate" element={<ProductAddUpdate />} />
      <Route path="/detail/:id" element={<ProductDetail />} />
      <Route path="*" element={<Navigate to="/" />} />
    </Routes>
  );
};

export default Product;
